/**
 * Copyright (C), 2019-2020, 宇信融汇
 * FileName: CollectionsTest
 * Author:   xbliu
 * Date:     2020/7/22 8:49
 * Description: Collections工具类
 * History:
 * <author>          <time>          <version>          <desc>
 * xbliu           修改时间           版本号              描述
 */
package c_009.map;

import org.junit.Test;

import java.util.ArrayList;

/**
 * @Classname CollectionsTest
 * @Description TODO
 * @Date 2020/7/22 8:49
 * @Created by xbliu
 */
public class CollectionsTest {
    @Test
    public void test1() {
        final ArrayList list1 = new ArrayList();
        list1.add(11);
        list1.add(222);
        list1.add(333);
        list1.add(-555);
        list1.add(444);
        System.out.println(list1);
        //Collections.reverse(list1);
        //Collections.shuffle(list1);
       // Collections.sort(list1);
//        Collections.sort(list1, new Comparator() {
//            @Override
//            public int compare(Object o1, Object o2) {
//
//                return -Integer.compare((Integer) o1,(Integer)o2);
//            }
//        });
       // Collections.swap(list1,1,2);
        System.out.println(list1);
    }
    @Test
    public  void test2(){


    }
}
